import request from '@/utils/request'

/**
 * @method资产相关接口
 */
export default {
	/**
	 * @method获取今日单价
	 */
	nowPrice() {
		return request({
			url: `/ws/moneyPrice/nowPrice`,
			method: 'get',
		})
	},

	/**
	 * @method获取熵豆今日单价
	 */
	shangdouNowPrice() {
		return request({
			url: `/ws/moneyPrice/shangdou/nowPrice`,
			method: 'get',
		})
	},

	/**
	 * @method获取预计支付金额
	 */
	countNum(data) {
		return request({
			url: `/ws/moneyPrice/count/jindou`,
			method: 'get',
			data
		})
	},

	/**
	 * @method获取熵豆预计支付金额
	 */
	countShangdouNum(data) {
		return request({
			url: `/ws/moneyPrice/count/shangdou`,
			method: 'get',
			data
		})
	},

	// 获取预计熵豆
	countShangdou(data) {
		return request({
			url: `/ws/moneyPrice/num/shangdou`,
			method: 'get',
			data
		})
	},

	/**
	 * @method发布求购
	 */
	publish(data) {
		return request({
			url: `/ws/market/publish`,
			method: 'get',
			data
		})
	},

	/**
	 * @method熵豆发布求购
	 */
	shangdouPublish(data) {
		return request({
			url: `/ws/market/shangdou/v2/publish`,
			method: 'get',
			data
		})
	},

	/**
	 * @method求购单列表
	 */
	marketList(data) {
		return request({
			url: `/ws/market/list`,
			method: 'get',
			data
		})
	},

	/**
	 * @method熵豆求购单列表
	 */
	shangdouMarketList(data) {
		return request({
			url: `/ws/market/shangdou/list`,
			method: 'get',
			data
		})
	},


	/**
	 * @method卖出
	 */
	marketReceive(data) {
		return request({
			url: `/ws/market/receive`,
			method: 'get',
			data
		})
	},

	/**
	 * @method熵豆卖出
	 */
	shangdouReceive(data) {
		return request({
			url: `/ws/market/shangdou/v2/receive`,
			method: 'get',
			data
		})
	},

	/**
	 * @method我的求购单
	 */
	marketMineList(data) {
		return request({
			url: `/ws/market/mineList`,
			method: 'get',
			data
		})
	},

	/**
	 * @method我的熵豆求购单
	 */
	shangdouMineList(data) {
		return request({
			url: `/ws/market/shangdou/mineList`,
			method: 'get',
			data
		})
	},

	/**
	 * @method我的出售单
	 */
	marketReceiverList(data) {
		return request({
			url: `/ws/market/receiverList`,
			method: 'get',
			data
		})
	},

	/**
	 * @method我的熵豆出售单
	 */
	shangdouReceiverList(data) {
		return request({
			url: `/ws/market/shangdou/receiverList`,
			method: 'get',
			data
		})
	},

	/**
	 * @method金豆走势
	 */
	jindouChart() {
		return request({
			url: `/ws/moneyPrice/jindou/chart`,
			method: 'get',
		})
	},

	/**
	 * @method熵豆走势
	 */
	shangdouChart() {
		return request({
			url: `/ws/moneyPrice/shangdou/chart`,
			method: 'get',
		})
	},

	// 熵豆数据
	shangdouData() {
		return request({
			url: `/ws/shangdou`,
			method: 'get',
		})
	},

	// 熵豆记录
	shangdouRecord(data) {
		return request({
			url: `/ws/shangdou/records`,
			method: 'get',
			data
		})
	},

	// 撤单
	shangdouRefund(data) {
		return request({
			url: `/ws/market/shangdou/v2/refund`,
			method: 'get',
			data
		})
	}
}